import {
  get,
  put,
  _delete,
  post
} from '@/lin/plugin/axios'
class FriLink {
  static async getAll(page, count) {
    const res = await get('cloudSystem/recruit/friLink/page', {
      page: page,
      count: count
    })
    return res
  }

  static async getById(id) {
    const res = await get(`cloudSystem/recruit/friLink/${id}`)
    return res
  }

  static async update(id, data) {
    const res = await put(`cloudSystem/recruit/friLink/${id}`, data)
    return res
  }

  static async delete(id) {
    const res = await _delete(`cloudSystem/recruit/friLink/${id}`)
    return res
  }

  static async createFriLink(data) {
    const res = await post('cloudSystem/recruit/friLink', data)
    return res
  }

  static async getList() {
    const res = await get('cloudSystem/recruit/friLink')
    return res
  }

  static async show() {
    const res = await get('cloudSystem/recruit/friLink/show')
    return res
  }

  static async getDongData() {
    const res = await get('cloudBusiness/recruit/ct/posDongCt')
    return res
  }
  static async getCtData() {
    const res = await get('cloudBusiness/recruit/ct/posClkCt')
    return res
  }
  
  static async posCompanyCt() {
    const res = await get('cloudBusiness/recruit/ct/posCompanyCt')
    return res
  }
  
  static async posByCompanyCt(companyId) {
    const res = await get('cloudBusiness/recruit/ct/posByCompanyCt?companyId='+companyId)
    return res
  } 
  
  static async companyList() {
    const res = await get('cloudBusiness/recruit/ct/companyList')
    return res
  }
  
  static async posAddCt(dayNum) {
    const res = await get('cloudBusiness/recruit/ct/posAddCt?dayNum='+dayNum)
    return res
  } 
  
 static async posCount() {
    const res = await get('cloudBusiness/recruit/ct/posCt')
    return res
  }  
  
  static async total() {
    const res = await get('cloudBusiness/recruit/ct/total')
    return res
  } 
}

export {
  FriLink
}
